<!DOCTYPE html>
<html>
    <head>
        <title>event bind</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
        <script src="./vendor/avalon/avalon.modern.min.js" ></script>
        <style>
           
        </style>
        <script type="text/javascript">

            var count = 0
            var model = avalon.define({
                $id: "multi-click",
                str1: "1",
                str2: "2",
                str3: "3",
                click0: function() {
                    model.str1 = "xxxxxxxxx" + (count++)
                },
                click1: function() {
                    model.str2 = "xxxxxxxxx" + (count++)
                },
                click2: function() {
                    model.str3 = "xxxxxxxxx" + (count++)
                }
            })




            avalon.define({
                $id: "multi-click2",
                fn: function() {
                    console.log("11111111")
                },
                fn1: function() {
                    console.log("2222222")
                },
                fn2: function() {
                    console.log("3333333")
                }
            })
        </script>
    </head>
    <body>
        <fieldset>
            <legend>一个元素绑定多个同种事件的回调</legend>
            <div ms-controller="multi-click">
                <div ms-click="click0" ms-click-1="click1" ms-click-2="click2" >请点我</div>
                <div>{{str1}}</div>
                <div>{{str2}}</div>
                <div>{{str3}}</div>
            </div>
        </fieldset>

        
        <div ms-controller="multi-click2" 
             ms-on-mouseenter-3="fn"
             ms-on-mouseenter-2="fn1"
             ms-on-mouseenter-1="fn2"
             style="width:100px;height:100px;background: red;"
             >
        </div>


    </body>
</html>
